<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head>
        <title><?= $config['area_name'] ?></title>
        <meta name="viewport" content="width=device-width, initial-scale=0, user-scalable=yes, minimum-scale=0.5, maximum-scale=1.0" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <link id="favicon" rel="icon" type="image/png" href="images/image.png" />
        <base href="<?= base_url(1); ?>" />
        <link href="css/index.css?ver=<?= $config['version'] ?>" rel="stylesheet" type="text/css" />
        <link href="<?= $config['res_url'] ?>/css/jquery.dialog.css?ver=<?= $config['version'] ?>" rel="stylesheet" type="text/css" />
        <script type="text/javascript">if (window.top !== window.self)
                window.top.location.reload();</script>
        <script type="text/javascript">
        function check_area() {
        }
    </script>
    </head>
    <body scroll="no" onload="check_area()">
        <div id="zoomtips"></div>
        <div id="zoominner"><div id="zoomstate"></div></div>
        <div id="expandall">
            <h1><span><?= translate('INDEX_SHORTCUT_TEXT') ?></span><a href="javascript:;">X <?= translate('CLOSE') ?></a></h1>
        </div>
        <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
            <tr id="topnav" style="">
                <td height="48">
                    <table width="100%" height="48" border="0" cellpadding="0" cellspacing="0" class="admin_topbg">
                        <tr>
                            <td width="40%" valign="top" height="42">
                                <div id="toplogo">
                                    <a id="logo" href="javascript:;" onclick="$('ul.nav li:first a').click();" title="<?= translate('HOME') ?>"><?= translate('CONTROLPANEL') ?></a>
                                    <div id="areatip"><?= $config['area_name'] ?></div>
                                </div>
                            </td>
                            <td width="60%" valign="top" align="right">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="38" class="admin_txt">
                                            <span id="playerid">玩家id</span> |
                                            <span id="servertime" title="<?= translate('INDEX_SERVER_TIME') ?>"></span>
                                            <?= translate('INDEX_NAV_TEXT_WELCOME') ?> <b><?= $user['username']?></b> |
                                            <?php
                                            	//var_dump($areadata); 
                                            ?>
                                            <span id="platlist">
                                                <b><?= $area_selected_name ?></b>
                                                <ul>
                                                    <?php foreach ($areadata as $m => $n) { ?>
                                                        <li><a href="?area_selected_id=<?= $n['SvrID'] ?>" style="<?= in_array($n['SvrState'], array('hide', 'close', 'prepare')) ? "color:gray" : ($config['area_id'] == $n['SvrID'] ? "color:#f40" : '') ?>"><?= $n['SvrName'] ?></a></li>
                                                    <?php } ?>
                                                </ul>
                                            </span> |
                                           <!-- 
                                            <span id="area_state"></span>  | -->
                                            <a href="<?= site_url('index/logout') ?>" style="color:#fff;"><?= translate('LOGOUT') ?></a>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" style="background: #EEF2FB" id="maintable" height="100%">
                        <tbody>
                            <tr>
                                <td class="main_left" id="frmtitle" valign="top" align="middle" name="fmtitle" height="100%">
                                    <iframe class="left_iframe" id="frmleft" name="left" src="<?= site_url('index/left'); ?>" scrolling="auto" frameborder="0" allowtransparency></iframe>
                                </td>
                                <td style="width: 5px;" bgcolor="#EEF2FB" height="100%">
                                    <table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
                                        <tr height="50%"><td valign="top"><img src="images/top.gif" id="top" title="<?= translate('JS_INDEX_NAV_TOGGLE') ?>" alt="" /></td></tr>
                                        <tr><td valign="top"><img src="images/right.gif" id="switch" title="<?= translate('JS_INDEX_SIDEBAR_HIDE') ?>" alt="" /></td></tr>
                                    </table>
                                </td>
                                <td valign="top" bgcolor="#f7f8f9" id="tabletd" height="100%">
                                    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" id="maininnertable">
                                        <tbody>
                                            <tr>
                                                <td height="31" valign="top" background="images/mainleftbg.gif"><img src="images/lefttopright.gif" height="29" alt="" /></td>
                                                <td valign="top" background="images/contentbg.gif">
                                                    <ul class="nav">
                                                        <li><a href="<?= site_url("general/main") ?>" title="<?= translate('HOME') ?>" style="padding-right:10px;" class="current"><span></span><?= translate('HOME') ?></a></li>
                                                    </ul>
                                                </td>
                                                <td valign="top" background="images/mainrightbg.gif">
                                                    <img src="images/navrightbg.gif" height="29" alt="" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="middle" background="images/mainleftbg.gif">&nbsp;</td>
                                                <td width="100%" id="frametd" height="100%">
                                                    <iframe class="main_iframe" id="mainframe" title="<?= translate('HOME') ?>" name="main" src="<?= site_url('general/main'); ?>" scrolling="auto" frameborder="0" allowtransparency></iframe>
                                                </td>
                                                <td background="images/mainrightbg.gif">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td height="5" valign="bottom" style="background:url(images/bottomleft2.gif) no-repeat;"></td>
                                                <td style="background:url(images/bottombgs.gif) repeat-x"></td>
                                                <td style="background:url(images/bottomright2.gif) no-repeat;"></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td></tr>
        </table>
    </body>
    <script type="text/javascript">
            var LANG = <?= json_encode($jslang) ?>;
    </script>
    <script type="text/javascript" src="<?= $config['res_url'] ?>/js/jquery.min.js?ver=<?= $config['version'] ?>"></script>
    <script type="text/javascript" src="<?= $config['res_url'] ?>/js/jquery.easing.js?ver=<?= $config['version'] ?>"></script>
    <script type="text/javascript" src="<?= $config['res_url'] ?>/js/base.js?ver=<?= $config['version'] ?>"></script>
    <script type="text/javascript" src="<?= $config['res_url'] ?>/js/jquery.dialog.js?ver=<?= $config['version'] ?>"></script>
    <script type="text/javascript" src="<?= $config['res_url'] ?>/js/jquery.multiselect.js?ver=<?= $config['version'] ?>"></script>
    <script type="text/javascript" src="<?= $config['res_url'] ?>/js/swfobject.js?ver=<?= $config['version'] ?>"></script>
    <script type="text/javascript">
        SG.config = {
            version: "<?= $config['version'] ?>",
            res_url: "<?= $config['res_url'] ?>",
            servertime: "<?= $current_time ?>",
            offsetseconds: "<?= get_timezone_offset($config['timezone']) ?>",
        };
    </script>
    <script type="text/javascript" src="js/index.js?ver=<?= $config['version'] ?>"></script>  
</html>